package com.cs.study.homework._0316;

public class Demo {
    public static void main(String[] args) {
        System.out.println(find("abcd", "baedc"));
    }

    private static char find(String s, String t) {
        char[] c1 = s.toCharArray();
        char[] c2 = t.toCharArray();

        char res = c2[0];
        for (int i = 0; i < c1.length; i++) {
            //利用异或运算求不同
            res ^= c1[i];
            res ^= c2[i + 1];

        }
        return res;
    }

}




